package misp_backend.service;

import misp_backend.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;
import java.util.List;

/**
* @author yang
* @description 针对表【sys_user(用户表)】的数据库操作Service
* @createDate 2025-05-14 22:58:24
*/
public interface UserService {
    User selectUserById(Long userId);

    User selectUserByUserName(String userName);

    List<User> selectUserList(User user);

    int deleteUserById(Long userId);

    int insertUser(User user);

    void insertUserRole(User user);

    void insertUserAuth(Long userId, Long[] roleIds);

    int updateUser(User user);

    boolean checkUserNameUnique(String userName);

    int updateUserAvatar(User user);

    int resetUserPassword(User user);

    String selectUserRoleGroup(String userName);

    String selectUserRoleGroup(User user);

    boolean validateUser(String username, String password);
    Collection<? extends GrantedAuthority> getAuthorities(User user);
}
